<form action="index.php" method="post">
<fieldset>
	<dl>
		<dt>
			Title:
		</dt>
		<dd>
			<input type="text" name="title" value="<?=$event->title ?>"/>
		</dd>
		<dt>
			Description:
		</dt>
		<dd>
			<textarea name="description" ><?=$event->description ?></textarea>
		</dd>
		<dt>
			Date:
		</dt>
		<dd>
			<?php if(!$event->event_date) $event->event_date = new DateTime ?>
			<?php $date_str = is_object($event->event_date) ? $event->event_date->format('m/d/Y') : "" ?>
			<input type="text" name="event_date" value="<?= $date_str ?>" />
		</dd>	
	</dl>
</fieldset>
<input type="hidden" name="controller" value="Event" />
<input type="hidden" name="action" value="save" />
<input type="hidden" name="user_id" value="<?= current_user()->id ?>" />

<input type="hidden" name="id" value="<?=$event->id ?>" />
<input type="submit" value="Save Event" />

</form>
<?php if (!$event->is_new()): ?>
<form action="index.php" method="post">
	<input type="hidden" name="controller" value="Event" />
	<input type="hidden" name="action" value="delete" />
	<input type="hidden" name="id" value="<?=$event->id ?>" />
	<input type="submit" value="Delete Event" />
</form>
<?php endif ?>